<!doctype html>
<html lang="en">	
	<head>
		<meta charset="UTF-8">
		<meta name="Generator" content="EditPlus®">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<title>js-判断</title>
		<style>
			*{margin:0;padding:0;}
			a{text-decoration:none;}
			ul,li{list-style:none;}
			body{font-size:12px;font-family:"微软雅黑";}
			#box{
				overflow:hidden;
				width:1120px;
				height:500px;
			}


		</style>
	</head>
	<body>
		<div id="box">
			<img id="boximg1" src="lb-1.jpg" alt="">
			<img id="boximg2" src="lb-2.jpg" alt="">
		</div>
		
		<script type="text/javascript">
			var oBox=document.getElementById("box"),
			oBoxImg1=document.getElementById("boximg1"),
			oBoxImg2=document.getElementById("boximg2");
			oBoxImg1.onclick = function(){
				oBoxImg1.style.display="none";
				oBoxImg2.style.display="block";
			}
			oBoxImg2.onclick = function(){
				oBoxImg2.style.display="none";
				oBoxImg1.style.display="block";
			}
		</script>	
		
		
	</body>
</html>
